<?php 
  include_once '../../config.php';

 if(empty($_GET['email'])){
   exit('数据库异常');
 }else{
  $value=$_GET['email'];

  // echo $value;
  
  $mysql=mysqli_connect(XIU_DB_HOST,XIU_DB_USER,XIU_DB_PWD,XIU_DB_NAME);
  if(!$mysql){
    exit('数据库连接失败');
  }

  $query=mysqli_query($mysql,"select avatar from users where email = '{$value}';");
  if(!$query){
    exit('获取数据失败');
  }

  $rows=mysqli_fetch_assoc($query);
  if(!$rows){
    exit('没有这个用户');
  }
  echo $rows['avatar'];

  mysqli_affected_rows($mysql);
  mysqli_close($mysql);
 }
?>